< previous page page_193 next page >

Page 193
Exercises
1. Create a public function in a BAS module to which you can pass a ZIP code string. This function should verify that the ZIP code is in the proper ZIP code or ZIP+4 format.
2. Create a public function in a BAS module to which you can pass a Social Security number (SSN) string. This function should verify that the SSN is in the proper format: 999-99-9999.
3. Add a Birth Date text box named txtBirthDate to the Employee form.
Add a Salary text box named txtSalary to the form.
Create a function in the Employee Information form called FormCheck() that returns a Boolean value.
This function should validate the following information for the fields on the form:
9f31265bb40b592b1929e18a47ab28e5.gif
The txtLast cannot be empty.
9f31265bb40b592b1929e18a47ab28e5.gif
The cboState combo box must have a state selected.
9f31265bb40b592b1929e18a47ab28e5.gif
The ZIP code must be filled in and must be in either a ZIP code or ZIP+4 format.
9f31265bb40b592b1929e18a47ab28e5.gif
The SSN must be filled in and must be in a valid format.
9f31265bb40b592b1929e18a47ab28e5.gif
The birth date must be a valid date.
9f31265bb40b592b1929e18a47ab28e5.gif
The salary field must be numeric.
9f31265bb40b592b1929e18a47ab28e5.gif
If the Health Plan check box is selected, make sure that at least one item in the Health Care Choices list box has been cheked.

 
< previous page page_193 next page >

If you like this book, buy it!